package database.objects;

/**
 * MessageOwner Object based upon the message_owner table.
 * 
 * @author Project group 9
 * 
 */
public class MessageOwner implements DatabaseObject {

	private long id;
	private long twitterId;
	private String name;
	private String profileImageURL;
	
	/**
	 * The real constructor for MessageOwner.
	 * @param id The id of the user.
	 * @param twitterId The twitterId of the user. 
	 * @param name The twitterName of the user. 
	 * @param profileImageURL The profileImageURL of the user on twitter.
	 */
	public MessageOwner(long id, long twitterId, String name,
			String profileImageURL) {
		this.id = id;
		this.twitterId = twitterId;
		this.name = name;
		this.profileImageURL = profileImageURL;
	}

	/**
	 * Builds a fake MessageOwner object when a user isn't found. This makes
	 * sure that the application keeps running, even when an SQLException is
	 * thrown.
	 */
	public MessageOwner() {
		this.id = -1;
		this.twitterId = -1;
		this.name = "Unkown user";
		this.profileImageURL = "";
	}

	public long getId() {
		return id;
	}

	public long getTwitterId() {
		return twitterId;
	}

	public void setTwitterId(long twitterId) {
		this.twitterId = twitterId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getProfileImageURL() {
		return profileImageURL;
	}

	public void setProfileImageURL(String profileImageURL) {
		this.profileImageURL = profileImageURL;
	}
}
